# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh

# Get real command.
# - arg: $1  Command
# - stdout:  Filename of command in PATH with possible symbolic links resolved.
# - return:  True (0) if command found, False (> 0) if not.
_realcommand() {
	if type -p realpath > /dev/null; then
		realpath "$(type -P "$1")"
	elif type -p readlink > /dev/null; then
		readlink -f "$(type -P "$1")"
	else
		echo "$1"
	fi
} # _realcommand()

